package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.AttendOvertimeRuleExample.E_ATTEND_PLAN_ID;
import static org.jsola.hr.example.AttendOvertimeRuleExample.E_NON_WORK_DAY_RULE_JSON;
import static org.jsola.hr.example.AttendOvertimeRuleExample.E_OVERTIME_TYPE;
import static org.jsola.hr.example.AttendOvertimeRuleExample.E_WORK_DAY_RULE_JSON;
import static org.jsola.hr.example.AttendOvertimeRuleExample.M_ATTEND_PLAN_ID_MAX;
import static org.jsola.hr.example.AttendOvertimeRuleExample.M_NON_WORK_DAY_RULE_JSON_MAX;
import static org.jsola.hr.example.AttendOvertimeRuleExample.M_WORK_DAY_RULE_JSON_MAX;
import static org.jsola.hr.example.AttendOvertimeRuleExample.N_ATTEND_PLAN_ID;
import static org.jsola.hr.example.AttendOvertimeRuleExample.N_NON_WORK_DAY_RULE_JSON;
import static org.jsola.hr.example.AttendOvertimeRuleExample.N_OVERTIME_TYPE;
import static org.jsola.hr.example.AttendOvertimeRuleExample.N_WORK_DAY_RULE_JSON;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【考勤加班规则】的参数")
@Data
public class AttendOvertimeRuleUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_ATTEND_PLAN_ID, example = E_ATTEND_PLAN_ID)
    @Length(max = 32, message = M_ATTEND_PLAN_ID_MAX)
    private String attendPlanId;

    @ApiModelProperty(notes = N_OVERTIME_TYPE, example = E_OVERTIME_TYPE)
    private Integer overtimeType;

    @ApiModelProperty(notes = N_WORK_DAY_RULE_JSON, example = E_WORK_DAY_RULE_JSON)
    @Length(max = 255, message = M_WORK_DAY_RULE_JSON_MAX)
    private String workDayRuleJson;

    @ApiModelProperty(notes = N_NON_WORK_DAY_RULE_JSON, example = E_NON_WORK_DAY_RULE_JSON)
    @Length(max = 255, message = M_NON_WORK_DAY_RULE_JSON_MAX)
    private String nonWorkDayRuleJson;


}

